//
//  BKNewsViewController.m
//  baokaodaxue
//
//  Created by dangyangyang on 15/5/25.
//  Copyright (c) 2015年 报考大学. All rights reserved.
//

#import "BKNewsViewController.h"
#import "BKNewsListViewController.h"
@interface BKNewsViewController ()

@end

@implementation BKNewsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)viewDidAppear:(BOOL)animated{
    
    [super viewDidAppear:animated];
    UITabBarController *tabBarViewController = (UITabBarController *)[[[UIApplication sharedApplication] keyWindow] rootViewController];
    [tabBarViewController.tabBar setBarTintColor:[UIColor colorWithRed:0.459 green:0.839 blue:0.863 alpha:1.000]];
}
- (IBAction)p_news:(id)sender {
    UIButton *button = (UIButton *)sender;
    switch (button.tag) {
        case 2000:{
        
        
            BKNewsListViewController *listVC = [[BKNewsListViewController alloc] initWithNibName:NSStringFromClass([BKNewsListViewController class]) bundle:nil];
            listVC.type = @"1";
            listVC.typeName = @"备考经验谈";
            [self.navigationController pushViewController:listVC animated:YES];
            
        }
            
            break;
        case 2001:{
        
            BKNewsListViewController *listVC = [[BKNewsListViewController alloc] initWithNibName:NSStringFromClass([BKNewsListViewController class]) bundle:nil];
            listVC.type = @"21";
            listVC.typeName = @"专业排名";
            [self.navigationController pushViewController:listVC animated:YES];
        }
            break;
            
        case 2002:{
            
            BKNewsListViewController *listVC = [[BKNewsListViewController alloc] initWithNibName:NSStringFromClass([BKNewsListViewController class]) bundle:nil];
            listVC.type = @"31";
            listVC.typeName = @"热点论坛";
            [self.navigationController pushViewController:listVC animated:YES];
        }
            break;

        case 2003:{
            
            BKNewsListViewController *listVC = [[BKNewsListViewController alloc] initWithNibName:NSStringFromClass([BKNewsListViewController class]) bundle:nil];
            listVC.type = @"11";
            listVC.typeName = @"大学排名";
            [self.navigationController pushViewController:listVC animated:YES];
        }
            break;
            

            
            
        default:{
        
            UIAlertView *alert =[ [UIAlertView alloc] initWithTitle:@"提示" message:@"即将开放，敬请期待" delegate:nil cancelButtonTitle:@"好的" otherButtonTitles:nil, nil];
            [alert show];
        }
            break;
    }
    
    
    
}


@end
